Skip to content

ci(a11y): the contract job also runs the specs of components that import a touched module from Core's hooks/ or utils/ - #14261

Draft
cixzhang wants to merge 5 commits into
mainfrom
ci/a11y-shared-hook-importers
Draft

cixzhang wants to merge 5 commits into
mainfrom
ci/a11y-shared-hook-importers

Conversation

@cixzhang

@cixzhang cixzhang commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

User impact

A pull request that changes a shared hook or util in Core (packages/core/src/hooks/ or packages/core/src/utils/) can change how every component that uses it behaves for keyboard and screen-reader users. The contract job ran none of those components' accessibility specs: such a change touches no component folder, so the job found nothing to run and skipped. After this change, the job runs the scoped and release-only accessibility specs of the components that import the changed hook or util, nearest first, inside the same one-minute share it already gives to components that render a touched component.

Problem and solution fit

  • Why does the gap occur? The contract job seeds its import-graph walk from the files of touched component folders. A hook or util lives outside any component folder, so a hook-only change seeds nothing, and the job's own condition skips it (no touched component, no changed spec).
  • Why does that harm the task? The import graph already follows shared files, so the components a hook reaches are known; the job just never asked.
  • Why does that matter? A regression in a shared hook (focus, keyboard handling, announcements) reaches its users without any accessibility spec running before merge.

The fix seeds the same walk from the changed hooks and utils, through the same source value-import graph, and spends the same one-minute share; nothing about the budget changes. What does not fit is named in the job summary as not run, with the label that runs it.

Expected behavior and authority

spec:AST-030 FR12 (current) states the contract job's default check. This pull request corrects one line of it, as the specification owner ruled: after "that render a touched component" it adds "or import a touched shared hook or util (a module under packages/core/src/hooks/ or packages/core/src/utils/)", and adds one verification row. Two places in the same record said the opposite and are aligned with it: FR13's summary of the contract job now names the folders that import a touched module under those two folders and no longer says it never widens to shared modules, and the failure column of FR12's existing contract-job verification row no longer calls an importer's spec running a failure.

Held as a draft for a decision. AST-030 DEC-22 (decided 2026-11-02) says shared modules keep their scope, so this widening changes that decision; it waits on the decider's answer. On yes, a DEC-22 amendment line citing that answer is added and the record is approved again. The one-minute share and every other limit are unchanged.

Smallest restoration

  • a11y-pr-contracts.mjs exports sharedModules (the changed source under the two folders, never a test, story, doc, spec or declaration); touched-components.mjs imports it for its new contract_shared output, and the runner's --shared-modules uses the same function, so the rule lives in one place.
  • ci.yml's contract job runs when that list is not empty and passes it to the runner (--shared-modules).
  • a11y-pr-contracts.mjs: renderingFolders also walks from those files. A folder is marked via: 'shared' when the shared walk reaches it nearer than the component walk, or only that walk reaches it; a tie stays component. The spec reason, the budget message and the summary line name the shared case.
  • docs/specs/AST-030/spec.md: the FR12 line, one new verification row, the matching FR13 clause, and the failure column of FR12's existing contract-job row.
  • isRenderedSource also leaves out .d.mts and .d.cts declarations and TypeScript's <name>.d.<ext>.ts declarations such as theme.d.css.ts (it left out only .d.ts), so no declaration file is a shared module or an import-graph node.

Evidence

  • Reproduction before the change: against main's two scripts, 9 of the new and updated cases fail: a hook-only and a util-only change plan no importer, the touched step has no sharedModules and no contract_shared output, and the reasons and summary lines do not name shared modules.
  • Result after the change: 130 of 130 cases in the two test files pass.
  • Representative unchanged path: a component change still lists exactly the folders that render it, now marked via: 'component' (the existing fix(Spinner): route standalone loading through the shared announcement channel #7910-shaped case, unchanged except for that field).
  • Regression test or other mutation-sensitive proof: a11y-pr-contracts.test.mjs shared-module cases (a hook-only change plans its importer; a util-only change does the same and a test that imports it is not a component; a hook nothing imports plans none; a folder reached both ways counts once; a shared importer's spec is named by why it runs and stays inside the one-minute share) (its spec at 50 s overflows the one-minute share and is named with that reason); touched-components.test.mjs sharedModules and contract_shared cases.

Scope

Components: CI accessibility contract job (touched-components, a11y-pr-contracts, ci.yml) and AST-030 FR12

  • One defect is restored.
  • Separable contradictory or unsettled tagalongs were removed or split.
  • No new public API, visual representation, default, or interaction model is hidden under the bug-fix label.
  • Public text and artifacts contain no internal Meta context.

Testing

  • pnpm exec vitest run --project node .github/scripts/a11y-pr-contracts.test.mjs .github/scripts/touched-components.test.mjs: 130 passed
  • Every suite that reads ci.yml, a11y-pr-contracts.mjs or touched-components.mjs passes: 56 files, 1,270 tests.
  • pnpm check:knowledge: "Knowledge templates and records are aligned."
  • pnpm specs:for --diff origin/main: lists the global records every path routes; no record governs the changed lines beyond AST-030, whose FR12, its verification rows and FR13 this pull request updates, and whose DEC-22 this change waits on (see above).

Writing rubric results

R1 narration: the added FR12 words state what the job runs; no proposal or history.
R2 research: none in the record.
R3 evidence: the new verification row names the tests and the states they cover, not a pull request.
R4 rejected alternatives: none added.
R5 change references: none added.
R6 open questions: none touched.
R7 project status: none; the row states behavior.

Overlap

Overlap checked: #14146, #14223, #14208, #14114, #14249, #14228, #13963, #13023, #13769, #13762, #13571, #12985, #12359 (#14146 is a draft with the same idea for the opt-in labelled accessibility run (pr-a11y): complementary, since this changes the default contract job, but both edit a11y-pr-contracts.mjs, so whichever lands second takes a main merge; this keeps its new helper private and named seededFolders so it does not clash with #14146's exported reachedFolders. The others edit other parts of a11y-pr-contracts.mjs, touched-components.mjs, ci.yml or AST-030.)

CI impact

CI impact: the contract job (pr-component-a11y-contracts, standard GitHub-hosted runner) now also runs for a pull request that changes only a module under packages/core/src/hooks/ or packages/core/src/utils/, where it skipped before; on such a pull request it adds the job's setup (about 1.5 minutes) and at most one minute of importer specs, within its existing eight-minute stop and fifteen-minute limit, beside the unit tests, so time to green does not grow. A pull request that changes such a module beside a component or a changed spec runs as before, except that the importers' specs join the rendering folders' specs in the same one-minute share, so a rendering folder's spec can move to "not run" when the share fills. A pull request that changes no module under those two folders runs exactly as before, except when CI cannot decide its scope (for example, GitHub cannot list its changed files): the job then counts every file as changed, so every hook and util seeds the walk and their importers' specs join the share. That fails closed, like the rest of that path. This edits .github/workflows/ci.yml and two scripts every pull request's CI reads, so it merges at the end of a batch.

…ort a touched shared hook or util

A change to a module under packages/core/src/hooks/ or packages/core/src/utils/
touches no component folder, so the contract job ran nothing for it. The
touched step now lists such changed modules (contract_shared), and the
runner walks their importers through the same value-import graph, nearest
first, inside the same one-minute share; what does not fit is named as not
run. AST-030 FR12 says so, with a verification row.
@vercel

vercel Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Dec 3, 2026 7:44pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Dec 3, 2026
@astracat-bot

astracat-bot Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
❓ Needs maintainer input (for maintainers only) Dec 3, 2026, 8:00 PM UTC

@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Dec 3, 2026
@github-actions

github-actions Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

Current run: The current CI run concluded skipped. Current analysis is unavailable.


Generated by PR Enrichment workflow | View current CI run

@cixzhang
cixzhang marked this pull request as ready for review December 3, 2026 16:09
@cixzhang

cixzhang commented Dec 3, 2026

Copy link
Copy Markdown
Contributor Author

/approve-spec 01934eb

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Dec 3, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes: the new seed walk selects and reports the right specs, and the FR12 update carries its spec approval at this head, but four small fixes remain:

  • Duplicated shared-module rule: sharedModules in .github/scripts/touched-components.mjs (lines 63-71) copies the runner's SHARED_MODULE and isRenderedSource rule, so export one sharedModules(files) from a11y-pr-contracts.mjs, use it in its main(), import it in touched-components.mjs (other scripts already import that module), and delete the copy.
  • False claim: every other pull request runs exactly as before: a pull request that changes a hook or util beside a component or a changed spec now adds the importers' specs to the same one-minute share, where a rendering folder's spec can move to not run (reproduced locally), so reword the CI impact line to say that.
  • False claim about the via field: renderingFolders also marks via: 'shared' when both walks reach a folder and the shared walk is nearer (a11y-pr-contracts.mjs lines 629-631), so describe it as nearer through the shared walk, with a tie staying component.
  • Shared-importer test never reaches the one-minute share: the 400 s file in that test is rejected by the 6-minute plan before the share check (test lines 702-725), so give it about 50 s and assert the 1-minute share reason that the new verification row says these cases catch.

The two changed test files pass locally (131 tests), and 12 of their cases fail against the base scripts. Optional: DEC-22 in the same record still says shared modules keep their scope, and an appended amendment would keep it consistent with FR12.

Claims and files checked

Review mode: full; reason: no-earlier-review

  • Claim: the contract job also runs the specs of components that import a changed Core hook or util. Verified by the new walk and its tests.
  • Claim: before, a hook-only or util-only change touched no component folder, so the job skipped. Reported; consistent with the base scope logic and the base skip condition.
  • Claim: importers' scoped and release-only specs run nearest first in the same one-minute share. Verified by code; the share case for importers is untested (finding).
  • Claim: the walk is seeded from touched folders, the import graph already crosses shared files, and the budget is unchanged. Verified; no limit changes in the diff.
  • Claim: specs that do not fit are named as not run, with the label that runs them. Verified by the planner reason and its test.
  • Claim: the FR12 clause and one verification row change, with the specification owner's approval. Verified; the exact-head spec approval is posted.
  • Claim: the touched step lists shared modules and never a test, story, doc, spec or declaration. Verified by its tests.
  • Claim: the workflow runs the job when that list is non-empty and passes it to the runner. Verified; all nine gated steps carry the new condition.
  • Claim: the via field is shared only when a folder is reached only that way. False (finding).
  • Claim: the spec reason, the budget message and the summary line name shared imports. Verified.
  • Claim: 10 new or updated cases fail against the base's two scripts. Reported; consistent, since 12 fail locally when the base workflow file is used too.
  • Claim: 131 of 131 cases pass. Verified locally.
  • Claim: a component change still lists the folders that render it, now marked as a component. Verified by test.
  • Claim: the listed regression cases prove each behavior. Partly unverified: the one-minute share case is not exercised (finding).
  • Claim: every suite that reads the workflow or the two scripts passes. Reported; locally 69 of 79 such files pass, and the other 10 need a git working tree.
  • Claim: the knowledge check is aligned. Verified locally.
  • Claim: the spec routing lookup lists no other governing claim. Reported.
  • Claim: scope checklist and writing rubric results. Verified; no internal context found, and the new runner flag is stated openly.
  • Claim: overlap with other open pull requests, with the new helper kept private. Reported; the helper is module-private.
  • Claim: the job now runs for a hook-only or util-only pull request and adds about 1.5 minutes of setup plus at most one minute of specs. The run is verified; the timings are reported.
  • Claim: every other pull request runs exactly as before. False (finding).
  • File .github/scripts/a11y-pr-contracts.mjs: clear; it owns the rule the touched step copies.
  • File .github/scripts/a11y-pr-contracts.test.mjs: finding (share test).
  • File .github/scripts/touched-components.mjs: finding (duplicated rule).
  • File .github/scripts/touched-components.test.mjs: clear.
  • File .github/workflows/ci.yml: clear; no permission or required-check change.
  • File docs/specs/AST-030/spec.md: note (DEC-22 wording; the new row overstates share coverage).

Automated review (maintainer link)

Comment thread .github/scripts/touched-components.mjs Resolved
touched-components imports sharedModules from a11y-pr-contracts.mjs instead
of keeping a copy, and the runner's main() uses the same function. The
shared importer's test now reaches the one-minute share (50 s) and checks
that reason.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes: the new seed walk picks and reports the right specs, and the FR12 update carries its spec approval at this head, but six fixes remain:

  • Unamended FR13 contradicts the change: FR13 in docs/specs/AST-030/spec.md (lines 339-342) still says the contract job "neither widens to shared modules", and DEC-22 still says shared modules keep their scope, so add the importers of a touched Core hook or util to FR13's list, drop "shared modules" from that clause, and append a one-line amendment under DEC-22.
  • Duplicated shared-module rule: sharedModules in .github/scripts/touched-components.mjs (lines 63-71) copies the runner's SHARED_MODULE and isRenderedSource rule, so export one sharedModules(files) from a11y-pr-contracts.mjs, use it in its main(), import it in touched-components.mjs (other scripts already import that module), and delete the copy.
  • False claim: every other pull request runs exactly as before: a hook or util change beside a component, beside a changed spec, or beside any other path such as a changeset now runs differently (the importers join the one-minute share, or the job runs where it used to skip), so reword it to "a pull request that changes no Core hook or util source runs exactly as before".
  • False claim about the via field: renderingFolders also marks via: 'shared' when both walks reach a folder and the shared walk is nearer (a11y-pr-contracts.mjs lines 629-631), so describe it as nearer through the shared walk, with a tie staying component.
  • False claim: declarations are never shared modules: both rules exclude only .d.ts, so a changed .d.mts or .d.cts declaration under hooks/ or utils/ is listed and starts the job (reproduced locally), so exclude \.d\.[cm]?ts$ in the one shared rule and add that case to the sharedModules test.
  • Shared-importer test never reaches the one-minute share: the 400 s file in that test is rejected by the 6-minute plan before the share check (test lines 702-725), so give it about 50 s and assert the 1-minute share reason that the new verification row says these cases catch.

The two changed test files pass locally (131 tests).

Claims and files checked

Review mode: same-head; reason: none

  • Claim: the contract job also runs the specs of components that import a changed Core hook or util. Verified by the new walk and its tests, run locally.
  • Claim: before, a hook-only or util-only change touched no component folder, so the job skipped. Reported; consistent with the base skip condition and seed rule.
  • Claim: importers' scoped and release-only specs run nearest first in the same one-minute share. Verified by code and a local probe; the cited test does not reach the share (finding).
  • Claim: the walk is seeded from touched folders and the import graph already crosses shared files. Verified by code.
  • Claim: the fix uses the same graph and the same one-minute share, and nothing about the budget changes. Verified; no budget constant changes.
  • Claim: specs that do not fit are named as not run, with the label that runs them. Verified by the planner reason and its test.
  • Claim: one FR12 sentence and one verification row change, as the specification owner ruled. Verified; the exact-head spec approval is posted.
  • Claim: the one-minute share and every other limit are unchanged. Verified.
  • Claim: the touched step lists shared modules, never a test, story, doc, spec or declaration. False for .d.mts and .d.cts declarations (finding).
  • Claim: the workflow runs the job when that list is not empty and passes it to the runner. Verified by reading: the skip step and all eight gated steps carry it, and the workflow contract test checks five of them and the new env value.
  • Claim: the via field is shared only when a folder is reached only that way. False (finding).
  • Claim: the spec reason, the budget message and the summary line name shared modules. Verified.
  • Claim: 10 new or updated cases fail against the base scripts. Reported; consistent with an earlier local run at this head, where 12 fail when the base workflow file is used too.
  • Claim: 131 of 131 cases pass. Verified locally.
  • Claim: a component change still lists exactly the folders that render it, now marked as a component. Verified by test.
  • Claim: the listed regression cases prove each behavior. Partly unverified: the one-minute share case is not exercised (finding).
  • Claim: every suite that reads the workflow or the two scripts passes. Reported; CI's test job has not run at this head.
  • Claim: the knowledge check is aligned. Verified locally.
  • Claim: no record governs the changed lines beyond the FR12 clause. False: FR13 and DEC-22 also state what the contract job runs (finding).
  • Claim: one defect, no tag-alongs, no hidden public API, no internal context. Verified; the new runner flag is stated openly.
  • Claim: writing rubric results for the record edit. Verified; the added words and row state behavior.
  • Claim: overlap with other open pull requests, with the new helper kept private. Reported; the helper is module-private.
  • Claim: the job now runs for a hook-only or util-only pull request, adding about 1.5 minutes of setup and at most one minute of specs within its limits. The run is verified; the timings are reported.
  • Claim: every other pull request runs exactly as before. False (finding).
  • Claim: it merges at the end of a batch. Reported.
  • File .github/scripts/a11y-pr-contracts.mjs: finding (via claim; it owns the rule the touched step copies).
  • File .github/scripts/a11y-pr-contracts.test.mjs: finding (share test).
  • File .github/scripts/touched-components.mjs: finding (duplicated rule; declarations).
  • File .github/scripts/touched-components.test.mjs: finding (no declaration case beyond .d.ts).
  • File .github/workflows/ci.yml: clear; no permission, trigger or required-check change.
  • File docs/specs/AST-030/spec.md: finding (FR13 and DEC-22 left contradicting FR12; the new row overstates share coverage).

Automated review (maintainer link)

Comment thread .github/scripts/touched-components.mjs Resolved
Comment thread docs/specs/AST-030/spec.md Resolved

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes: the shared-module rule now lives in one place and the share test reaches the one-minute share, and the FR12 update carries its spec approval at this head, but three fixes remain:

  • Unamended FR13 contradicts the change: FR13 in docs/specs/AST-030/spec.md (lines 339-342) still says the contract job "neither widens to shared modules", and DEC-22 (line 1351) still says shared modules keep their scope, so add the importers of a touched Core hook or util to FR13's list, drop "shared modules" from that clause, and append a one-line amendment under DEC-22.
  • False claim: declarations are never shared modules: sharedModules keeps .d.mts and .d.cts files because NOT_RENDERED in .github/scripts/a11y-pr-contracts.mjs (lines 410-411) excludes only .d.ts (reproduced locally), so exclude \.d\.[cm]?ts$ and add that case to the sharedModules test.
  • False claim: a pull request that changes no Core hook or util runs exactly as before: when CI cannot decide a pull request's scope (for example, GitHub cannot list its changed files), the job counts every file as changed (ci.yml lines 7223-7229), so every hook and util seeds the walk through contract_shared (touched-components.mjs line 628), and the sentence needs that exception (the wording suggested earlier missed this case).

The two changed test files pass locally (130 tests).

Claims and files checked

Review mode: incremental; reason: none

  • Title: the contract job also runs the specs of components that import a touched shared hook or util. Verified by the new walk and its tests, run locally.
  • Claim: a shared hook or util change can change how its users' components behave for keyboard and screen-reader users. Context; consistent with the change.
  • Claim: before, such a change touched no component folder, so the job found nothing to run and skipped. Reported; consistent with the base skip condition and seed rule.
  • Claim: after, the importers' scoped and release-only specs run, nearest first, inside the same one-minute share. Verified by code, tests and a local probe.
  • Claim: the walk is seeded from touched component folders, and the import graph already follows shared files. Verified by code.
  • Claim: the fix uses the same graph and the same share, and nothing about the budget changes. Verified; no budget constant changes.
  • Claim: what does not fit is named as not run, with the label that runs it. Verified by the planner reason and its test.
  • Claim: one FR12 line and one verification row change, as the spec owner ruled. Verified; spec approval is recorded at this head.
  • Claim: the one-minute share and every other limit are unchanged. Verified.
  • Claim: the runner exports the shared-module rule, never a test, story, doc, spec or declaration. False for .d.mts and .d.cts declarations (finding).
  • Claim: the touched step imports that rule for its new output and the runner flag uses the same function, so the rule lives in one place. Verified.
  • Claim: the workflow runs the job when that list is not empty and passes it to the runner. Verified by reading; the workflow test checks five of the eight gated steps and the new env value.
  • Claim: a folder is marked shared when the shared walk is nearer or alone, and a tie stays component. Verified by code and a local probe.
  • Claim: the spec reason, the budget message and the summary line name the shared case. Verified.
  • Claim: the FR12 line and one verification row are the record changes. Verified.
  • Claim: 9 new or updated cases fail against main's scripts. Reported.
  • Claim: 130 of 130 cases pass in the two test files. Verified locally.
  • Claim: a component change still lists exactly the folders that render it, now marked as component. Verified by test.
  • Claim: the listed regression cases, including the 50-second spec that overflows the share. Verified; each case exists and passes locally.
  • Claim: every suite that reads the workflow or the two scripts passes (56 files, 1,270 tests). Reported; CI's test job has not run at this head, and locally 69 of 79 related files pass, the other 10 needing a git checkout.
  • Claim: the knowledge check is aligned. Verified locally.
  • Claim: no record governs the changed lines beyond FR12. False: FR13 and DEC-22 also state what the contract job runs (finding).
  • Claim: one defect, no tag-alongs, no hidden public API, no internal context. Verified; the new runner flag is stated openly.
  • Claim: writing rubric results for the record edit. Verified; the added words and row state behavior.
  • Claim: overlap with other open pull requests, with the new helper kept private. Verified that the helper is not exported; the other pull requests' state is reported.
  • Claim: hook-only or util-only pull requests now run the job, adding about 1.5 minutes of setup and at most one minute of specs within its limits. The run and limits are verified; the timings are reported.
  • Claim: a hook or util change beside a component or a changed spec runs as before, except that importers join the same share. Verified by a local probe.
  • Claim: a pull request that changes no Core hook or util runs exactly as before. False when CI cannot decide the scope (finding).
  • Claim: it merges at the end of a batch. Reported.
  • File .github/scripts/a11y-pr-contracts.mjs: finding (declarations).
  • File .github/scripts/a11y-pr-contracts.test.mjs: clear.
  • File .github/scripts/touched-components.mjs: finding (undecided scope bound).
  • File .github/scripts/touched-components.test.mjs: finding (no declaration case beyond .d.ts).
  • File .github/workflows/ci.yml: clear; no permission, trigger or required-check change.
  • File docs/specs/AST-030/spec.md: finding (FR13 and DEC-22 left contradicting FR12).

Automated review (maintainer link)

Comment thread .github/scripts/a11y-pr-contracts.mjs Resolved
Comment thread .github/scripts/touched-components.mjs Resolved
…on file is a shared module

FR13's summary of the contract job names the folders that import a touched
Core hook or util, and DEC-22 gets a one-line amendment. isRenderedSource
also leaves out .d.mts and .d.cts declarations.
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Dec 3, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs an engineering owner's decision on the AST-030 changes before it can be approved, and three fixes remain.

Approval waits on an engineering owner approving, at this head, the AST-030 FR12 clause, its new verification row, the FR13 clause and the DEC-22 amendment: an engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner. The earlier /approve-spec named an earlier head, so it no longer applies.

  • FR12's verification row still calls the new behaviour a failure: the row at docs/specs/AST-030/spec.md:809 lists "a spec of a component that is neither changed, touched nor rendering a touched component runs in the contract job" as a failure, so add the importers of a touched Core hook or util there and correct the description's "Two places in the same record…" and "no record governs the changed lines beyond AST-030 FR12…" sentences.
  • Claims match scope: only hooks/ and utils/ modules seed the walk: the title, the CI-impact sentences, FR13 and the DEC-22 amendment cover any Core hook or util, but SHARED_MODULE (a11y-pr-contracts.mjs:638) skips the 16 Core hooks in gestures/, i18n/, internal/, keyboard/, theme/ and virtualization/ (a change to keyboard/useMobileKeyboard.ts alone still skips the job, reproduced locally), so name the two folders wherever those words appear or widen the rule and FR12 together.
  • False claim: no declaration file is a shared module or an import-graph node: NOT_RENDERED (a11y-pr-contracts.mjs:410-411) still passes TypeScript's <name>.d.<ext>.ts declarations such as theme.d.css.ts (reproduced locally), so exclude \.d\.(?:[^/.]+\.)?[cm]?ts$ with a test case, or narrow the wording in the description, the comment at lines 641-642 and the test title.

The two changed test files pass locally, 130 of 130, and the earlier FR13, DEC-22, .d.mts/.d.cts and undecided-scope points are fixed.

Claims and files checked

Review mode: full; reason: spec-record

  • Title: the contract job runs the specs of components that import a touched shared hook or util: false (only hooks/ and utils/ seed the walk).
  • Before, a hook-only change found nothing to run and skipped: reported; matches the base skip condition, from reading the code.
  • After, importers' scoped and release-only specs run nearest first in the one-minute share: verified (a11y-pr-contracts.test.mjs:637-722, run locally).
  • The import graph already follows shared files: verified (importerGraph).
  • Same graph, same one-minute share, no budget change: verified from the diff.
  • A spec that does not fit is named as not run with the label that runs it: verified (a11y-pr-contracts.mjs:979, test at 699-722).
  • FR12 states the default check; one clause and one verification row are added: verified (spec.md:266-268, :811); owner approval at this head: pending.
  • Two places in the record said the opposite and are now aligned: false (the FR12 row at spec.md:809).
  • The one-minute share and every other limit are unchanged: verified.
  • sharedModules lists changed source under the two folders, never a test, story, doc, spec or declaration: false (<name>.d.<ext>.ts).
  • The touched step imports it, the runner uses it, the rule lives in one place: verified (touched-components.mjs:24, :628; a11y-pr-contracts.mjs:1277).
  • ci.yml runs the job when the list is not empty and passes --shared-modules: verified (ci.yml:7287-7380).
  • via: 'shared' when strictly nearer or alone, a tie stays component: verified (a11y-pr-contracts.mjs:620-635, test at 683-697, local probe).
  • The not-run reason, share message and summary line name the shared case: verified (a11y-pr-contracts.mjs:825, :995, :1021).
  • The record edits are the FR12 line, a row, the FR13 clause and a DEC-22 amendment: verified from the diff.
  • isRenderedSource drops .d.mts/.d.cts, so no declaration is a shared module or graph node: false (<name>.d.<ext>.ts).
  • Nine new and updated cases fail against the base scripts: reported.
  • 130 of 130 cases pass in the two test files: verified (run locally).
  • A component change still lists its rendering folders, now with via: 'component': verified (test at 618-631).
  • The listed regression cases exist and assert their cases: verified.
  • Scope checklist (one defect, no tag-along, no hidden public API, no internal context): verified.
  • Every suite reading the changed files passes (56 files): reported; 13 importer suites run locally, 8 pass and 5 need repository history.
  • The knowledge check reports aligned records: verified (run locally).
  • No record governs the changed lines beyond FR12: false (FR13, DEC-22 and the row at spec.md:809).
  • Writing rubric results R1-R7: verified against the record edits.
  • Overlap: the new helper stays private as seededFolders: verified (a11y-pr-contracts.mjs:662); other pull requests' contents reported.
  • A pull request that changes only a Core hook or util now runs the job: false for Core hooks outside the two folders; setup and spec times reported.
  • A hook or util beside a component or spec: importers join the share: false for hooks outside the two folders, otherwise verified.
  • A pull request that changes no Core hook or util runs as before, except an undecided scope: verified.
  • .github/scripts/a11y-pr-contracts.mjs: findings (declaration rule at 410-411, folder rule at 638).
  • .github/scripts/a11y-pr-contracts.test.mjs: clear.
  • .github/scripts/touched-components.mjs: clear.
  • .github/scripts/touched-components.test.mjs: finding (test title at 1103 states the declaration rule).
  • .github/workflows/ci.yml: clear.
  • docs/specs/AST-030/spec.md: findings (row at 809; FR13 at 341 and DEC-22 at 1361 wording).

Automated review (maintainer link)

Comment thread docs/specs/AST-030/spec.md Resolved
Comment thread .github/scripts/a11y-pr-contracts.mjs Resolved
Comment thread .github/scripts/a11y-pr-contracts.mjs Resolved
…ss.ts declarations are left out too

FR13, the DEC-22 amendment and the failure column of FR12's contract-job
row name the two folders the rule covers. isRenderedSource also leaves out
TypeScript's <name>.d.<ext>.ts declarations.
@cixzhang cixzhang changed the title ci(a11y): the contract job also runs the specs of components that import a touched shared hook or util ci(a11y): the contract job also runs the specs of components that import a touched module from Core's hooks/ or utils/ Dec 3, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs an engineering owner's decision on the AST-030 changes before it can be approved; the code itself has no open findings.

  • Approval waits on an engineering owner's decision on the AST-030 changes: FR12's new clause and verification row, the edited FR12 routing row, the FR13 clause and the DEC-22 amendment change the current record, and the only /approve-spec names an earlier head, so an engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request at its current head (the author may do so as an engineering owner).

The earlier points on the FR12 row, the two-folder wording and declaration files are fixed, and the two changed test files pass locally, 130 of 130. Heavy CI has not run on this head yet.

Claims and files checked

Review mode: full; reason: spec-record

  • Title: the contract job also runs the specs of components that import a touched module from Core's hooks/ or utils/: verified (a11y-pr-contracts.mjs:620-651, tests at a11y-pr-contracts.test.mjs:637-697, run locally).
  • Before, a change to such a module found nothing to run and the job skipped: reported; matches the base skip condition, from reading the code.
  • After, the importers' scoped and release-only specs run nearest first inside the one-minute share: verified (tests at 637-722, run locally).
  • The import graph already follows shared files: verified (importerGraph, zero-cost steps through shared files).
  • Same walk, same graph, same one-minute share, no budget change: verified from the diff.
  • A spec that does not fit is named as not run with the label that runs it: verified (a11y-pr-contracts.mjs:979, test at 699-722).
  • FR12 gains one clause and one verification row, as the record owner ruled: the edits verified (spec.md:266-268, :812); owner approval at this head: pending.
  • Three places in the record are aligned (FR13, the DEC-22 amendment, the FR12 routing row): verified (spec.md:339-343, :1362-1365, :810).
  • The one-minute share and every other limit are unchanged: verified.
  • sharedModules lists changed source under the two folders, never a test, story, doc, spec or declaration, and the touched step and the runner share it: verified (a11y-pr-contracts.mjs:647-651, :1277; touched-components.mjs:24, :628; test at touched-components.test.mjs:1103-1123).
  • ci.yml runs the job when that list is not empty and passes --shared-modules: verified (ci.yml:7288-7381).
  • A folder is via: 'shared' only when that walk is strictly nearer or alone, and a tie stays component: verified (a11y-pr-contracts.mjs:620-636, test at 683-697).
  • The not-run reason, the share message and the summary line name the shared case: verified (a11y-pr-contracts.mjs:825, :995, :1021).
  • The record edits are the FR12 line, a new row, the FR13 clause, a DEC-22 amendment and the routing row's failure column: verified from the diff.
  • isRenderedSource leaves out .d.mts, .d.cts and <name>.d.<ext>.ts, so no declaration is a shared module or a graph node: verified (a11y-pr-contracts.mjs:410-411, test at touched-components.test.mjs:1103-1123).
  • Nine new and updated cases fail against the base scripts: reported; reproduced locally as 11 with the base workflow included.
  • 130 of 130 cases pass in the two test files: verified (run locally).
  • A component change still lists its rendering folders, now marked via: 'component': verified (test at a11y-pr-contracts.test.mjs:617-635).
  • The listed regression cases exist and assert their cases: verified.
  • Scope checklist: no tag-along, no hidden public API and no internal context verified; "one defect is restored" reported (the change is a record change under owner approval).
  • Every suite that reads the changed CI files passes: reported; locally all 72 workflow-script test files that read them pass.
  • The knowledge check reports aligned records: verified (run locally).
  • Only AST-030 governs the changed lines: verified (the changed scripts and workflow cite only AST-030 for them).
  • Writing rubric results R1-R7: verified against the record edits.
  • Overlap: the other draft pull request for the labelled run exports its own walk helper, and this one keeps seededFolders private: verified (live read of that pull request; a11y-pr-contracts.mjs:662).
  • CI impact: the job now runs for a change only to such a module on a standard hosted runner, inside its eight-minute stop and 15-minute limit: verified (ci.yml:7126-7127, :7288-7362); about 1.5 minutes of setup and no growth in time to green: reported.
  • Such a module beside a component or a changed spec: importers join the same share, so a rendering folder's spec can move to not run: verified (a11y-pr-contracts.mjs:803-827, :984-996).
  • No such module: the job runs as before, except an undecided scope, which seeds the walk from every hook and util and fails closed: verified (ci.yml:7221-7229, :7255; touched-components.mjs:628).
  • It merges at the end of a batch: reported.
  • .github/scripts/a11y-pr-contracts.mjs: clear.
  • .github/scripts/a11y-pr-contracts.test.mjs: clear.
  • .github/scripts/touched-components.mjs: clear.
  • .github/scripts/touched-components.test.mjs: clear.
  • .github/workflows/ci.yml: clear.
  • docs/specs/AST-030/spec.md: finding (the FR12, FR13 and DEC-22 edits wait on an engineering owner's approval).

Automated review (maintainer link)

@cixzhang
cixzhang marked this pull request as draft December 3, 2026 19:33
…wers

DEC-22 says shared modules keep their scope; changing that is the
decider's call, so the amendment waits on her answer.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs an engineering owner's decision on AST-030 DEC-22 before it can be approved, and one description fix remains.

  • Approval waits on an engineering owner's decision to change AST-030 DEC-22: FR12 and FR13 now send the importers of a touched packages/core/src/hooks/ or packages/core/src/utils/ module to the contract job while DEC-22 still says "Shared modules keep their scope", so once an engineering owner agrees and the DEC-22 amendment line is added, an engineering owner records the decision by commenting /approve-spec <full head SHA> on that head (you may do so yourself as an engineering owner).
  • The description's fix sentence claims every changed hook and util seeds the walk: "The fix seeds the same walk from the changed hooks and utils" also covers Core hooks outside the two folders, such as keyboard/useMobileKeyboard.ts (imported by BottomSheet, NumberInput, TextArea and TextInput), which SHARED_MODULE (a11y-pr-contracts.mjs:638) leaves out, so say "the changed modules under packages/core/src/hooks/ and packages/core/src/utils/".
  • Miss: dependentSpecs' JSDoc is stale (non-blocking): it still describes only rendering folders and types rendering without via (a11y-pr-contracts.mjs:797-800).

The code has no other open findings: locally, the two changed test files pass (130 of 130), and so do the 77 workflow-script test files that read the changed files. CI has not run on this head yet.

Claims and files checked

Review mode: full; reason: spec-record

  • Title: the contract job also runs the specs of components that import a touched module from Core's hooks/ or utils/: verified (a11y-pr-contracts.mjs:620-652; tests at a11y-pr-contracts.test.mjs:637-722, run locally).
  • Before, such a change touched no component folder, so the job skipped: verified at the base (the analysis maps hooks/utils to no owner, run locally; the walk seeded only touched folders).
  • After, the importers' scoped and release-only specs run nearest first inside the same one-minute share: verified (a11y-pr-contracts.mjs:803-827, :986-997; tests, run locally).
  • The import graph already followed shared files: verified (importerGraph, zero-cost steps through shared files).
  • The fix seeds the walk from "the changed hooks and utils": false; only hooks/ and utils/ seed (finding above).
  • Same graph, same one-minute share, no budget change; what does not fit is named as not run with its label: verified (a11y-pr-contracts.mjs:969-985; share test asserts 60 s).
  • FR12 gains one clause and one verification row as the record owner ruled: the edits verified (spec.md:265-269, :812); owner approval at this head: pending.
  • FR13 and the existing routing row's failure column are aligned: verified (spec.md:339-343, :810).
  • Held for the DEC-22 decision, with the one-minute share and other limits unchanged: verified (DEC-22 unchanged at spec.md:1352).
  • sharedModules lists changed source under the two folders, never a test, story, doc, spec or declaration, and the touched step and the runner share it: verified (a11y-pr-contracts.mjs:647-652, :1276-1279; touched-components.mjs:24, :628; test at touched-components.test.mjs:1102-1123).
  • ci.yml runs the job when that list is not empty and passes --shared-modules: verified (ci.yml:7288-7381).
  • A folder is via: 'shared' only when that walk reaches it alone or nearer, and a tie stays component; reasons, share message and summary line name the shared case: verified (a11y-pr-contracts.mjs:627-631, :825, :995, :1021).
  • The record edits are the FR12 line, one new row, the FR13 clause and the routing row's failure column: verified from the diff.
  • .d.mts, .d.cts and <name>.d.<ext>.ts are left out, so no declaration is a shared module or a graph node: verified (a11y-pr-contracts.mjs:410-411 covers TypeScript's four declaration forms; test cases for each).
  • Nine new and updated cases fail against the base scripts: reported; reproduced locally as 11 with the base workflow, 9 of them script cases.
  • 130 of 130 cases pass in the two test files: verified (run locally).
  • A component change still lists its rendering folders, now marked via: 'component': verified (test at a11y-pr-contracts.test.mjs:617-635).
  • The listed regression cases exist and assert their cases: verified.
  • Scope checklist: no tag-along, no hidden public API and no internal context verified; "one defect is restored" is the framing the DEC-22 decision settles.
  • Every suite that reads the changed CI files passes (56 files): reported; locally all 77 test files that name them pass.
  • The knowledge check reports aligned records: verified (run locally); the record-routing check: reported.
  • Writing rubric R1-R7: verified against the record edits.
  • Overlap: the other draft for the labelled run exports its own walk helper and this one keeps seededFolders private: verified (live read of that pull request; a11y-pr-contracts.mjs:662); the rest of the overlap list: reported.
  • CI impact: the job now runs for a change only to such a module: verified (ci.yml:7288-7362); about 1.5 minutes of setup and no growth in time to green: reported.
  • Such a module beside a component or changed spec: importers join the same share, so a rendering folder's spec can move to not run: verified (share test, run locally).
  • No such module: the job selects exactly as before, except an undecided scope, which seeds every hooks/ and utils/ module and fails closed: verified (other renderingFolders callers pass no shared seeds; no source under packages/*/src matches the new declaration pattern; ci.yml:7223-7227, :7255).
  • Files: .github/scripts/a11y-pr-contracts.mjs (one non-blocking JSDoc finding), .github/scripts/a11y-pr-contracts.test.mjs (clear), .github/scripts/touched-components.mjs (clear), .github/scripts/touched-components.test.mjs (clear), .github/workflows/ci.yml (clear), docs/specs/AST-030/spec.md (held for the DEC-22 decision).

Automated review (maintainer link)

}

/** A changed file under Core's `hooks/` or `utils/` folder, which Core's components import. */
export const SHARED_MODULE = /^packages\/core\/src\/(?:hooks|utils)\//;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This rule takes only hooks/ and utils/, but the description's "The fix seeds the same walk from the changed hooks and utils" (Problem and solution fit) reads as every Core hook; a change to keyboard/useMobileKeyboard.ts alone still skips the job, although BottomSheet, NumberInput, TextArea and TextInput import it. Say "the changed modules under packages/core/src/hooks/ and packages/core/src/utils/" there, as the title and CI impact already do.

*/
export function dependentSpecs(specs, rendering, planned) {
const depthOf = new Map(rendering.map(({folder, depth}) => [folder, depth]));
const viaOf = new Map(rendering.map(({folder, via}) => [folder, via]));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: the JSDoc above (797-800) still says "the component folders that render a touched folder" and types rendering as {folder: string, depth: number}[]. Add the shared-module importers and via: 'component' | 'shared'.

This branch was successfully deployed

1 active deployment
Preview — f4de90f7 Deployed Dec 3, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. needs:spec-owner-review Current knowledge records await owner approval

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant